#ifndef _LAUNCHPAD_H_
#define _LAUNCHPAD_H_

/**
 * Specify main MCU headerfile to be used in this project
 **/
#include <msp430g2231.h>

/**
 * Bit Manipulation Defines
 */
#ifndef BIT
#define BIT(x) ((1) << (x))
#endif

#define BITSET(port,bit) (port) |= (bit)
#define BITCLR(port,bit) (port) &= ~(bit)

#define ON          (1)
#define OFF         (0)

#define TRUE        (1)
#define FALSE       (0)

/**
 * Launchpad LED Defines
 */
#define LED_G       BIT(6)      //p1.6
#define LED_R       BIT(0)      //p1.0

/**
 * Launchpad Push Button Defines
 */
#define USR_BUTTON  BIT(3)

/**
 * Exported Functions
 */
extern void LAUNCHPAD_Init(void);
extern void delay(unsigned int d);
extern void delay_ms(unsigned int d);

#endif /* _LAUNCHPAD_H_ */
